package com.kexinde.wjifen.dao;

import java.util.List;

import com.kexinde.wjifen.model.ShopProduct;
import com.kexinde.wjifen.util.JdbcTemplate;

/**
 * 微分数据库操作类
 * 
 * @author vincent
 * 
 */
public class ShopPointDao {

	/**
	 * 查询某个会员在多少间店铺拥有微分
	 * 
	 * @param userId
	 *            用户id
	 * @return int
	 * @throws Exception 
	 */
	public int countShopPointAmount(Long userId) throws Exception {
		String sql = "select count(shopId) from tb_shoppoint where userId=?";
		Object[] params = { userId };
		return JdbcTemplate.count(sql, params);
	}

}
